package foodmaterial.entity;

import foodmaterial.action.valid.ObjectNullValid;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;

/**
 * 配送方式
 */
public class SupplyType implements Serializable {
    private static final long serialVersionUID = -6755588211231083352L;

    private Long id ;
    @NotEmpty(message = "配送类型名称不能为空")
    private String name;// '名称',
    @ObjectNullValid(message = "提前配送天数不能为空")
    @Min(value = 0,message = "提前配送天数大于等于0")
    @Max(value = 30,message = "提前配送天数小于等于30")
    private Integer aheadTime;// '提前配送天数'
    private Integer pageNo = 1;
    private Integer pageSize = 10;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAheadTime() {
        return aheadTime;
    }

    public void setAheadTime(Integer aheadTime) {
        this.aheadTime = aheadTime;
    }

    public Integer getPageNo() {
        return pageNo;
    }

    public void setPageNo(Integer pageNo) {
        this.pageNo = pageNo;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }
}
